import React,{Component} from 'react'
import './style.less'
import { Button } from 'antd'


export default class Life extends Component {
    constructor(props) {
        super(props)
        this.state = {
            count:0
        }
    }
    handleRemoveClick() {
        this.setState({
            count:this.state.count-1
        })
    }
    handleClick = () => {
        this.setState({
            count:this.state.count+1
        })
    }
    render() {
        return (
            <div className="demo-content">
                <div>React</div>
                <Button type="primary" onClick={this.handleRemoveClick.bind(this)}>点击一下减少</Button>
                <button onClick={this.handleClick}>点击一下增加</button>
                <div>{this.state.count}</div>
            </div>
        )
    }
}